package com.atguigu.gmall.weball;

import com.atguigu.gmall.common.config.interceptor.annotation.EnableRequestHeaderInterceptor;
import com.atguigu.gmall.common.execption.GlobalExceptionHandler;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;

/**
 * @Author:lyd
 **/
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.product",
        "com.atguigu.gmall.feign.item",
        "com.atguigu.gmall.feign.cart",
        "com.atguigu.gmall.feign.order",
})
@Import(GlobalExceptionHandler.class)
@EnableRequestHeaderInterceptor
public class WebAllApplication {
    public static void main(String[] args) {
        SpringApplication.run(WebAllApplication.class, args);
    }
}
